//
//  GuiderDetailCell.m
//  ImGuider
//
//  Created by 王鹏宇 on 2017/4/20.
//  Copyright © 2017年 imguider. All rights reserved.
//

#import "GuiderDetailCell.h"
#import "StarRateView.h"

@interface GuiderDetailCell()

@property (weak, nonatomic) IBOutlet UIImageView *ScenicImageView;

@property (weak, nonatomic) IBOutlet UILabel *ScenicDescribeLabel;

@property (weak, nonatomic) IBOutlet UILabel *scenicNumLabel;

@property (weak, nonatomic) IBOutlet UILabel *listenCountLabel;
@property (weak, nonatomic) IBOutlet StarRateView *starView;

@property (weak, nonatomic) IBOutlet UILabel *country_cityLabel;
@end

@implementation GuiderDetailCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.ScenicDescribeLabel.textColor = kContentColor;
    self.scenicNumLabel.textColor = kContentColor;
    self.listenCountLabel.textColor = kContentColor;
}


- (void)configDataWith:(LineModel *)model {
    [self.ScenicImageView setImageURL:[NSURL URLWithString:model.pictureArray.firstObject] placeholderImage:[UIImage imageNamed:@"placeholder_squ"]];
    self.ScenicDescribeLabel.text = model.linename;
    if (model.country.length>0 && model.city.length > 0) {
         self.country_cityLabel.text = [NSString stringWithFormat:@"%@-%@",model.country,model.city];
    }
    //self.scenicNumLabel.text = [NSString stringWithFormat:@"%@",model.recordcount];
    self.listenCountLabel.text = model.visits;
    [self.starView setScore:model.score.floatValue/10];
}
@end
